﻿using System;
using System.Collections;
using System.Linq;
using System.Text;

using GameServer.Managers;
using GameServer.Networking.Packets;
using GameServer.Virtual_Objects.Room;
using GameServer.Virtual_Objects.User;

namespace GameServer
{

    class VehicleSeat
    {

        public Vehicle _OwnerVehicle;
        public Vehicle OwnerVehicle
        {
            get { return this._OwnerVehicle; }
        }
        public virtualUser _Owner = null;
        public virtualUser Owner()
        {
            return this._Owner;
        }
        internal void TakeOwnership(Vehicle _OwnerVehicle)
        {
            if (this._OwnerVehicle == null)
                this._OwnerVehicle = _OwnerVehicle;
        }

        public bool TakeSeat(virtualUser client)
        {
            if (this._Owner == null)
            {
                this._Owner = client;
                return true;
            }
            return false;
        }
        public void LeaveSeat()
        {
            this._Owner = null;
        }

        public int _MainCT;
        public int MainCT
        {
            get { return this._MainCT; }
            set { this._MainCT = value; }
        }
        public int _SubCT;
        public int SubCT
        {
            get { return this._SubCT; }
            set { this._SubCT = value; }
        }
        public string _SeatCode;
        public string SeatCode
        {
            get { return this._SeatCode; }
        }

        public VehicleSeat(int _MainCT, int _SubCT, string _SeatCode)
        {
            this._MainCT = _MainCT;
            this._SubCT = _SubCT;
            this._SeatCode = _SeatCode;
        }

    }
}